<div class="row">
    <div class="col-xs-12">
        <div class="box box-success">
            <div class="box-header">
                <h3 class="box-title">查询</h3>
            </div>
            <div class="box-body">
                <form>
                    <div class="col-lg-1">
                        <div class="form-group">
                            <label>角色选择:</label>

                            <select class="form-control" name="role">
                                <option value="1">学生</option>
                                <option value="0">老师</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-lg-2">
                        <div class="form-group">
                            <label>姓名查询:</label>

                            <input type="text" name="name" class="form-control pull-right">
                        </div>
                    </div>
                    <div class="col-lg-4">
                        <div class="form-group">
                            <label>日期选择:</label>

                            <div class="input-group date">
                                <div class="input-group col-lg-10">
                                    <span class="input-group-addon">
                                        <input type="checkbox" name="date_select">
                                    </span>
                                    <input type="text" name="date" class="form-control pull-right" id="reservation">
                                    <div class="input-group-addon">
                                        <i class="fa fa-calendar"></i>
                                    </div>
                                </div>
                                <span class="input-group-btn">
                                    <button type="button" class="btn btn-success btn-flat" data-url="{{ url('admin/consumes/find') }}" onclick="postfun(this)">查询</button>
                                </span>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>

    </div>
</div>

<div class="row">
    <div class="col-xs-12">
        <div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title">消费记录</h3>

                <div class="box-tools">
                </div>
            </div>

            <!-- /.box-header -->
            <div class="box-body table-responsive no-padding">
                <table class="table table-hover">
                    <tr>
                        <th>ID</th>
                        <th width="200px">上课日期</th>
                        <th width="200px">上课时间</th>
                        <th>课程名称</th>
                        <th>学生</th>
                        <th>老师</th>
                        <th>课时数</th>
                        <th>课时费</th>
                        {{--<th>操作</th>--}}
                    </tr>
                    @foreach($consumes as $consume)
                    <tr id="list_table">
                        <td>{{ $consume->consume_id }}</td>
                        <td>{{ $consume->class_date }}</td>
                        <td>{{ $consume->class_time }}</td>
                        <td>{{ $consume->course_name }}</td>
                        <td>{{ $consume->child_name }}</td>
                        <td>{{ $consume->teacher_name }}</td>
                        <td>{{ $consume->class_hour }}</td>
                        <td>{{ $consume->value }}</td>
                    </tr>
                    @endforeach
                    <tfoot>
                    <tr>
                        <th></th>
                        <th>总计课时数</th>
                        <th></th>
                        <th></th>
                        <th></th>
                        <th></th>
                        <th>共 <font color="red">{{ $class_hour_count }}</font> 课时</th>
                        <th></th>
                    </tr>
                    </tfoot>
                </table>
            </div>
            <div class="box-footer clearfix">
                <ul class="pagination pagination-sm no-margin pull-right">
                    {!! $consumes->links('vendor.pagination.pages') !!}
                </ul>
            </div>
            <!-- /.box-body -->
        </div>
        <!-- /.box -->
    </div>
</div>
<script>
    $(function () {
        $('#reservation').daterangepicker();
    });
</script>